package com.example.bookcar.mapper;

import com.example.bookcar.entity.Brand;
import com.example.bookcar.vo.CarBrandorTypeVO;
import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.session.RowBounds;

import java.util.List;

/**
* @author 18225
* @description 针对表【t_brand(品牌表)】的数据库操作Mapper
* @createDate 2023-03-01 16:34:05
* @Entity com.example.bookcar.pojo.Brand
*/
@Mapper
public interface BrandMapper {
    List<CarBrandorTypeVO> listBrands();
//    RowBonds分页
//    List<Brand> listBrandInfos(String keyword, RowBounds rowBounds);
    Page<Brand> listBrandInfos(String keyword);

    Brand getBrandInfoById(Integer id);

    int updateBrandInfo(@Param("brand") Brand brand);

    int insertBrandInfo(Brand brand);

    @Delete("delete from t_brand where id = #{id}")
    int deleteBrandInfoById(Integer id);
}




